from likeshop_project.base.mybase import Tools
from likeshop_project.accountapi.login_api import login_model

class obtain_address_list_information_model(Tools):
    path = '/api/user_address/lists'
    def obtain_address_list_information_action(self,hb):

        res = self.huihua.get(url=self.hosturl+self.path,headers=hb)
        return res.json()


if __name__ == '__main__':

    import requests
    s = requests.session()
    re = login_model(huihua=s)
    mag = re.login_action(account='17909898989',password='123wqewqrf')
    gettoken = mag['data'].get('token')
    hb = {'token':gettoken}
    re = obtain_address_list_information_model(huihua=s)
    msg =re.obtain_address_list_information_action(hb=hb)
    e = msg['data'][0]['id']
    print(msg)
    print(e)